package com.coco.service.Impl;

import java.sql.SQLException;
import java.util.List;

import com.coco.dao.Impl.CategoryDaoImpl;
import com.coco.model.Category;
import com.coco.service.CategoryService;

public class CategoryServiceImpl implements CategoryService{
	
	private CategoryDaoImpl categoryDaoImpl=new CategoryDaoImpl();
	
	@Override
	public List<Category> findAllCategory() throws SQLException {
		
		return categoryDaoImpl.findAllCategory();
			
	}

	@Override
	public Category findById(String cid) throws SQLException {
		String sql = "select * from category where cid=?";
		return categoryDaoImpl.findById(sql,cid);
			
	}

}

	